package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;

/*维修工单*/

@Entity
public class Weixiugongdan {
    private int gdId;//维修工单id
    private String gdHao;//工单号
    private String jiedanren;//接单人
    private Timestamp jiedanTime;//接单时间
    private String gdLeixing;//工单类型
    private String gdBaoxiu;//保修
    private Timestamp gdCpxsriqi;//工单产品销售日期
    private String gdGuzhangmiaoshu;//故障描述
    private String gdZhuyishixiang;//注意事项
    private String jiedanZhuangkuan;//接单状况
    private Dept dept;//承接部门
    private BigDecimal weixiuMoney;//维修费用
    private BigDecimal weixiuYishoumoney;//维修已收款
    private String gdZhuangtai;//工单状态
    private String gdBeizhu;//工单备注
    private Kehu kH;//客户对象（客户id）
    private Contacts contactsByCId;//联系人对象（联系人id）
    private Dingdan dingdan;//订单对象（订单id）

    private Integer gdYs;

    private String gdSh;//工单进度（检测。。。。。/不是审核）

    private Integer sfwx;//判断是否确定维修（不为修是 = 3）

    private List<Wxgdxiangqing> wxgdxiangqing;

    @Column(name = "sfwx")
    public Integer getSfwx() {
        return sfwx;
    }

    public void setSfwx(Integer sfwx) {
        this.sfwx = sfwx;
    }

    @OneToMany(mappedBy = "weixiugongdan")
    public List<Wxgdxiangqing> getWxgdxiangqing() {
        return wxgdxiangqing;
    }

    public void setWxgdxiangqing(List<Wxgdxiangqing> wxgdxiangqing) {
        this.wxgdxiangqing = wxgdxiangqing;
    }

    @Column(name = "gd_sh")
    public String getGdSh() {
        return gdSh;
    }

    public void setGdSh(String gdSh) {
        this.gdSh = gdSh;
    }

    @Basic
    @Column(name = "gd_ys")
    public Integer getGdYs() {
        return gdYs;
    }

    public void setGdYs(Integer gdYs) {
        this.gdYs = gdYs;
    }

    @Id
    @Column(name = "gd_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getGdId() {
        return gdId;
    }

    public void setGdId(int gdId) {
        this.gdId = gdId;
    }

    @Basic
    @Column(name = "gd_hao", nullable = true, length = 200)
    public String getGdHao() {
        return gdHao;
    }

    public void setGdHao(String gdHao) {
        this.gdHao = gdHao;
    }

    @Basic
    @Column(name = "jiedanren", nullable = true, length = 200)
    public String getJiedanren() {
        return jiedanren;
    }

    public void setJiedanren(String jiedanren) {
        this.jiedanren = jiedanren;
    }

    @Basic
    @Column(name = "jiedan_time", nullable = false)
    public Timestamp getJiedanTime() {
        return jiedanTime;
    }

    public void setJiedanTime(Timestamp jiedanTime) {
        this.jiedanTime = jiedanTime;
    }

    @Basic
    @Column(name = "gd_leixing", nullable = true, length = 200)
    public String getGdLeixing() {
        return gdLeixing;
    }

    public void setGdLeixing(String gdLeixing) {
        this.gdLeixing = gdLeixing;
    }

    @Basic
    @Column(name = "gd_baoxiu", nullable = true, length = 200)
    public String getGdBaoxiu() {
        return gdBaoxiu;
    }

    public void setGdBaoxiu(String gdBaoxiu) {
        this.gdBaoxiu = gdBaoxiu;
    }

    @Basic
    @Column(name = "gd_cpxsriqi", nullable = false)
    public Timestamp getGdCpxsriqi() {
        return gdCpxsriqi;
    }

    public void setGdCpxsriqi(Timestamp gdCpxsriqi) {
        this.gdCpxsriqi = gdCpxsriqi;
    }

    @Basic
    @Column(name = "gd_guzhangmiaoshu", nullable = true, length = 200)
    public String getGdGuzhangmiaoshu() {
        return gdGuzhangmiaoshu;
    }

    public void setGdGuzhangmiaoshu(String gdGuzhangmiaoshu) {
        this.gdGuzhangmiaoshu = gdGuzhangmiaoshu;
    }

    @Basic
    @Column(name = "gd_zhuyishixiang", nullable = true, length = 200)
    public String getGdZhuyishixiang() {
        return gdZhuyishixiang;
    }

    public void setGdZhuyishixiang(String gdZhuyishixiang) {
        this.gdZhuyishixiang = gdZhuyishixiang;
    }

    @Basic
    @Column(name = "jiedan_zhuangkuan", nullable = true, length = 200)
    public String getJiedanZhuangkuan() {
        return jiedanZhuangkuan;
    }

    public void setJiedanZhuangkuan(String jiedanZhuangkuan) {
        this.jiedanZhuangkuan = jiedanZhuangkuan;
    }

    @ManyToOne
    @JoinColumn(name = "dept_id", referencedColumnName = "dept_id")
    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }

    @Basic
    @Column(name = "weixiu_money", nullable = true, precision = 2)
    public BigDecimal getWeixiuMoney() {
        return weixiuMoney;
    }

    public void setWeixiuMoney(BigDecimal weixiuMoney) {
        this.weixiuMoney = weixiuMoney;
    }

    @Basic
    @Column(name = "weixiu_yishoumoney", nullable = true, precision = 2)
    public BigDecimal getWeixiuYishoumoney() {
        return weixiuYishoumoney;
    }

    public void setWeixiuYishoumoney(BigDecimal weixiuYishoumoney) {
        this.weixiuYishoumoney = weixiuYishoumoney;
    }

    @Basic
    @Column(name = "gd_zhuangtai", nullable = true, length = 200)
    public String getGdZhuangtai() {
        return gdZhuangtai;
    }

    public void setGdZhuangtai(String gdZhuangtai) {
        this.gdZhuangtai = gdZhuangtai;
    }

    @Basic
    @Column(name = "gd_beizhu", nullable = true, length = 200)
    public String getGdBeizhu() {
        return gdBeizhu;
    }

    public void setGdBeizhu(String gdBeizhu) {
        this.gdBeizhu = gdBeizhu;
    }

    @ManyToOne
    @JoinColumn(name = "k_id", referencedColumnName = "k_id")
    public Kehu getkH() {
        return kH;
    }

    public void setkH(Kehu kH) {
        this.kH = kH;
    }

    @ManyToOne
    @JoinColumn(name = "c_id", referencedColumnName = "c_id")
    public Contacts getContactsByCId() {
        return contactsByCId;
    }

    public void setContactsByCId(Contacts contactsByCId) {
        this.contactsByCId = contactsByCId;
    }

    @ManyToOne
    @JoinColumn(name = "dd_id", referencedColumnName = "dd_id")
    public Dingdan getDingdan() {
        return dingdan;
    }

    public void setDingdan(Dingdan dingdan) {
        this.dingdan = dingdan;
    }

}
